package com.woniu.service.impl;

import com.woniu.dao.ServiceCommentMapper;
import com.woniu.dto.ServiceCommentDTO;
import com.woniu.service.ServiceCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ServiceCommentServiceImpl implements ServiceCommentService {

    @Autowired
    private ServiceCommentMapper scMapper;
    @Override
    public List<ServiceCommentDTO> findByPage(Integer currentPage, Integer pageSize) {
        List<ServiceCommentDTO> list=scMapper.findByPage(currentPage,pageSize);
        return list;
    }

    @Override
    public void delComment(Integer id) {
        scMapper.delComment(id);
    }

    @Override
    public List<ServiceCommentDTO> select(String nickName, String payName) {
        List<ServiceCommentDTO> list=scMapper.select(nickName,payName);
        //System.out.println(list.size());
        return list;
    }
}
